<template>
  <div class="search">
    <el-row>
      <el-col :span="21">
        <el-input  v-model="input" class="h-40" placeholder="华为手机" :prefix-icon="Search" />
      </el-col>
      <el-col :span="3">
        <el-button type="danger" class="h-40 w-100" @click="search">搜索</el-button>
      </el-col>
    </el-row>
  </div>
</template>

<script setup>
import { reactive,ref } from 'vue'
import { Search } from '@element-plus/icons-vue'
import { useRouter } from "vue-router"
const router = useRouter()
const input = ref("")
const search=()=>{
  router.push({path:"/list",query:{keys:input.value}})
}
</script>

<style scoped>
</style>



